package work.thread_eg.concurrent.blockingqueue;

import java.util.concurrent.SynchronousQueue;

/**
 * 阻塞队列
 *
 * SynchronousQueue是在JUC的包下, 和多线程相关
 *
 * 特点
 *      1 容量大小是0, 不存储数据, 单纯的阻塞作用, 同步队列
 *      2 每次 put必须等待一个take, 否则线程会一直阻塞
 *
 *
 */
public class SynchronousQueueMain {
    public static void main(String[] args) throws InterruptedException {
        SynchronousQueue<String> synchronousQueue = new SynchronousQueue();
        synchronousQueue.put("111");
        System.out.println("END");
    }
}
